package com.anti.modular.bus.housebill.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 账单
 *
 * @author anti
 * @date 2021-05-07 09:59:46
 */
@Data
public class HouseBillExcel{

    private Long id;

    @Excel(name = "房間",needMerge = true, width = 30)
    private String roomName;

    @Excel(name = "承租人",needMerge = true)
    private String name;
    /**
     * 賬單類型 （字典 bill_type）
     */
    @Excel(name = "賬單類型",replace = {"綜合賬單_1","租金賬單_2","水電賬單_3","補收賬單_4"},needMerge = true)
    private String billType;
    /**
     * 收租日
     */
    @Excel(name = "收租日", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20,needMerge = true)
    private Date rentedDay;

    /**
     * 租期开始时间
     */
    @Excel(name = "賬單開始時間", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20,needMerge = true)
    private Date rentStartDate;

    /**
     * 租期结束时间
     */
    @Excel(name = "賬單結束時間", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20,needMerge = true)
    private Date rentEndDate;

    /**
     * 小計
     */
    @Excel(name = "小計",needMerge = true)
    private BigDecimal totalAmount;
    /**
     * 收款方式名稱
     */
//    @Excel(name = "收款類別")
//    private String detailName;
    @ExcelCollection(name = "费用项")
    private List<Cty> detailNameLs;

    /**
     * 實收金額
     */
    @Excel(name = "實收金額",needMerge = true)
    private BigDecimal receiveAmount;

    /**
     * 收款方式名稱
     */
    @Excel(name = "收款方式",needMerge = true)
    private String collectionTypeName;

    /**
     * 到账状态（到账，未到账，拖欠,废弃（退租之后），已清算（退租之后））
     */
    @Excel(name = "到账状态",replace = {"未到賬_0","到賬_1","清算_3","清算到賬_4"},needMerge = true)
    private String billStatus;
}
